#pragma once

#include<vector>

using namespace std;

template<size_t N>
class Bitset
{
public:
	Bitset()
	{
		_a.resize(N / 32 + 1);
	}

	void set(size_t x)
	{
		int i = x / 32;
		int j = x % 32;
		_a[i] |= (1 << j);
	}

	void reset(size_t x)
	{
		int i = x / 32;
		int j = x % 32;
		_a[i] &= (~(1 << j));
	}

	bool test(size_t x)
	{
		int i = x / 32;
		int j = x % 32;
		return _a[i] & (1 << j);
	}
private:
	vector<int> _a;
};
